package com.gwm.common.enums;

import lombok.Getter;

@Getter
public enum ExceptionEnums {

    ITEM_PRICE_NOT_NULL(501,"价格不能为空"),
    UPLOAD_FILE_ERROR(502,"上传失败，请重试"),
    STOCK_NOT_ENOUGH_ERROR(5000,"商品库存不足！"),

    INVALID_FILE_TYPE(4000, "无效的文件类型！"),
    INVALID_PARAM_ERROR(4000, "无效的请求参数！"),
    INVALID_PHONE_NUMBER(4000, "无效的手机号码"),
    INVALID_VERIFY_CODE(4000, "验证码错误！"),
    INVALID_USERNAME_PASSWORD(4000, "无效的用户名和密码！"),
    INVALID_SERVER_ID_SECRET(4000, "无效的服务id和密钥！"),
    INVALID_NOTIFY_PARAM(4000, "回调参数有误！"),
    INVALID_NOTIFY_SIGN(4000, "回调签名有误！"),

    CATEGORY_NOT_FOUND(4004, "商品分类不存在！"),
    BRAND_NOT_FOUND(4004, "品牌不存在！"),
    SPEC_NOT_FOUND(4004, "规格不存在！"),
    GOODS_NOT_FOUND(4004, "商品不存在！"),
    CARTS_NOT_FOUND(4004, "购物车不存在！"),
    APPLICATION_NOT_FOUND(4004, "应用不存在！"),
    ORDER_NOT_FOUND(4004, "订单不存在！"),
    ORDER_DETAIL_NOT_FOUND(4004, "订单数据不存在！"),

    DATA_TRANSFER_ERROR(5000, "数据转换异常！"),
    INSERT_OPERATION_FAIL(5000, "新增操作失败！"),
    UPDATE_OPERATION_FAIL(5000, "更新操作失败！"),
    DELETE_OPERATION_FAIL(5000, "删除操作失败！"),
    FILE_UPLOAD_ERROR(5000, "文件上传失败！"),
    DIRECTORY_WRITER_ERROR(5000, "目录写入失败！"),
    FILE_WRITER_ERROR(5000, "文件写入失败！"),
    SEND_MESSAGE_ERROR(5000, "短信发送失败！"),
    INVALID_ORDER_STATUS(5000, "订单状态不正确！"),

    SECKILL_NOT_FOUND(4004,"秒杀信息不存在！"),
    SECKILL_END_ERROR(4000,"抢购已结束！"),
    SECKILL_ALREADY_JOIN_ERROR(4000,"当前参与用户过多，请求稍后重试！"),

    UNAUTHORIZED(4001, "登录失效或未登录！");


    private int status;
    private String message;

    ExceptionEnums(int status, String message) {
        this.status = status;
        this.message = message;
    }
}
